package org.aiforum.frountend.dao;


import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.aiforum.domain.Contact;
import org.springframework.stereotype.Repository;

/**
 * 联系我们持久化实现类
 * @author VIC
 *
 */
@Repository("contactDao")
public class ContactDaoImpl implements ContactDao {
	
	/**
	 * 使用@PersistenceContext注解标注属性时,Spring会自动创建并注入实体管理器
	 */
	@PersistenceContext
	private EntityManager entityManager;

	@Override
	public void persist(Contact entity) {
		entityManager.persist(entity);
	}

}
